<template>
  <div class="about">
    <h1>This is an about page, 传递的参数内容为：{{page}}</h1>
    <router-view />
    <!-- 这里用的是相对路径 -->
    <router-link to="child"> go child</router-link>
    <router-link to="child2"> go child2</router-link>
    <hr>

    <!-- 这里用的是绝对路径 -->
    <router-link to="/about/child"> go child</router-link>
    <router-link to="/about/child2"> go child2</router-link>
  </div>
</template>

<script>
export default {
  data: function () {
    return {
      page: "",
    }
  },
  mounted: function () {
    this.page = this.$route.params.page
  }
}
</script>
